// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_SUPPLIER_CONTACT
// * CreateDate    : 2013-08-28 11:00:56
// * Creater       : CodeSmith
// * LastChangeDate: 2013-08-28 11:00:56
// * LastChanger   : 2013-08-28 11:00:56
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.Data;
using ESOL.Common.Entity;

namespace ESOL.Business.Mst
{
/// <summary>
    /// MstSupplierContact
    /// </summary>
    public partial class MstSupplierContactBs
    {
        #region GetByID
        /// <summary>
        /// Get Entity
        /// </summary>
        /// <param name="objMstSupplierContactEntity">Entity</param>
        /// <returns>Entity</returns>
        public static MstSupplierContactEntity GetMstSupplierContact(MstSupplierContactEntity objMstSupplierContactEntity)
        {
            return DataAccess.SelectSingle<MstSupplierContactEntity>(objMstSupplierContactEntity);
        }
        #endregion


        #region Insert
        /// <summary>
        /// Insert Data
        /// </summary>
        /// <param name="objMstSupplierContactEntity">Entity</param>
        /// <returns>true Insert Succeed; false Insert Fail</returns>
        public static bool InsertMstSupplierContact(MstSupplierContactEntity objMstSupplierContactEntity)
        {
            return DataAccess.Insert(objMstSupplierContactEntity);
        }

        public static bool InsertMstSupplierContact(List<MstSupplierContactEntity> objMstSupplierContactEntityList)
        {
            return DataAccess.Insert(objMstSupplierContactEntityList);
        }
        #endregion


        #region Update
        /// <summary>
        /// Update Data
        /// </summary>
        /// <param name="objMstSupplierContactEntity">Entity</param>
        /// <returns>true Update Succeed; false Update Fail</returns>
        public static bool UpdateMstSupplierContact(MstSupplierContactEntity objMstSupplierContactEntity)
        {
            return DataAccess.Update(objMstSupplierContactEntity);
        }

        public static bool UpdateMstSupplierContact(List<MstSupplierContactEntity> objMstSupplierContactEntityList)
        {
            return DataAccess.Update<MstSupplierContactEntity>(objMstSupplierContactEntityList);
        }
        #endregion


        #region Delete
        /// <summary>
        /// Delete Data
        /// </summary>
        /// <param name="objMstSupplierContactEntity">Entity</param>
        /// <returns>true Delete Succeed; false Delete Fail</returns>
        public static bool DeleteMstSupplierContact(MstSupplierContactEntity objMstSupplierContactEntity)
        {
            return DataAccess.Delete(objMstSupplierContactEntity);
        }

        public static bool DeleteMstSupplierContact(List<MstSupplierContactEntity> objMstSupplierContactEntityList)
        {
            return DataAccess.Delete<MstSupplierContactEntity>(objMstSupplierContactEntityList);
        }
        #endregion


        #region GetAll
        /// <summary>
        /// Get All Data
        /// </summary>
        /// <returns>Back All Data<returns>
        public static DataSet GetMstSupplierContactAll()
        {
            return DataAccess.SelectAllDataSet<MstSupplierContactEntity>();
        }
        /// <summary>
        /// Get All Data List
        /// </summary>
        /// <returns>Back All Data List<returns>
        public static List<MstSupplierContactEntity> GetMstSupplierContactAllList()
        {
            return DataAccess.SelectAll<MstSupplierContactEntity>();
        }
        #endregion

        public static List<MstSupplierContactEntity> GetSupplierContactAllListBySuppId(string suppId)
        {
            if (string.IsNullOrEmpty(suppId))
                return null;
            return DataAccess.Select<MstSupplierContactEntity>(new MstSupplierContactEntity { SupplierId = suppId });
        }

	}
	
	
}	

